package com.iris.thread.synchro;

public class SynchroTest {
	//可重入锁
	public synchronized void synchroMethod(int i){
		if(i>0){
			System.out.println("大于0==="+i);
			i--;
			synchroMethod(i);
		}else{
			System.out.println("xiaoyu0");
		}
	}
	public void synchroBlock(){
		String str="";
		synchronized (str) {
			
		}
	}

	public static void main(String[] args) {
		SynchroTest st=new SynchroTest();
		st.synchroMethod(10);
	}
}
